<style>
    #body{
        padding-top: 0 !important;
    }
   
</style>
<div id="body" class="layout">
    <div class="wrap">
        <div class="left">
            <ul class="sort-panel">
                <li class="s-text">Search events:</li>
                <li>
                    <a href="<?php echo $this->baseUrl(""); ?>">
                        <span class="first">
                            <span class="last">
                                <span class="middle">
                                    Home
                                </span>
                            </span>
                        </span>
                    </a>
                </li>
                <li>
                    <a href="<?php echo $this->baseUrl("events/celebrityevents"); ?>" class="current selected">
                        <span class="first">
                            <span class="last">
                                <span class="middle">
                                    Celebrity Events
                                </span>
                            </span>
                        </span>
                    </a>
                </li>
            </ul>
            <div class="cf"></div>
            <div class="page-name">
                Celebrity <strong>Events</strong>
            </div>
            <ul class="celebrity-events">
                <?php
                    foreach ($this->alldata as $key => $value)
                    {
                        $event_id = $value["event_id"];
                        $enc_event_id = getEncryptedString($event_id);
                        $event_title = $value["event_title"];
                        $event_info = $value["event_info"];
//                        $event_time = date("H:i ", strtotime($value["event_time"])) . " " . TIME_ZONE;
                        $event_time = date("g:i a", strtotime($value["event_time"]));
                        $event_url = $this->baseUrl("eventdetail/$enc_event_id");

                        $event_image_array = getEventImages($event_id);
                        $remaining_spots = $value["remaining_spots"];

                        $event_date_array = json_decode($value["event_date"]);
                        $event_date = $event_date_array->day[0] . " " . date("F", strtotime($event_date_array->month[0])) . " " . $event_date_array->year[0];
                        ?>
                        <li>
                            <a href="<?php echo $event_url; ?>"><img src="<?php echo $event_image_array[0]; ?>" alt="<?php echo $event_title; ?>" /></a>
                            <p class="etitle"><a href="<?php echo $event_url; ?>" class="tlink"><?php echo $event_info; ?></a></p>
                            <div class="info">
                                <div class="link"><a href="<?php echo $event_url; ?>"><?php echo geturl($event_url); ?></a></div>
                                <div class="date"><?php echo $event_date; ?></div>
                                <div class="clock"><?php echo $event_time; ?></div>
                            </div>
                            <div class="spot"><?php echo $remaining_spots; ?> spots remaining</div>
                        </li>
                        <?php
                    }
                ?>
            </ul>
            <div class="cf"></div>
            <br /><br />
            <?php
                echo $this->paginationControl($this->paginator, 'Sliding', 'pagination/pagination.phtml', array('type_of_data' => 'message_inbox'));
            ?>
        </div>
        <div class="right">
            <?php
                echo $this->partial("ads.phtml", array("ads_count" => "3"));
            ?>
        </div>
        <div class="cf"></div>
    </div>
</div>